<?php
/**
 * AutoCompleteReportItemTest.php
 * 
 * @author Bradley Booms <Bradley.Booms@nsighttel.com>
 * @version Creation Date: Apr 27, 2007
 */

/**
 * AutoCompleteReportItemTest.php class
 * 
 * 
 * 
 * Properties
 * -
 * 
 * @author Bradley Booms <Bradley.Booms@nsighttel.com>
 * @version Modified Date: Apr 27, 2007
 * 
 * Modifications:
 */
class BActiveGoogleMapTest extends TPage{
	public function openInfoWindow($sender, $param){
		$this->Map->openInfoWindow("Test0");
		$this->label->setText("Opened info window for marker Test0.");
	}
	
	public function textChanged($sender, $param){
		$this->label->setText($sender->getText());
	}
	
	public function closeInfoWindow($sender, $param){
		$this->Map->closeInfoWindow();
		$this->label->setText("Closed info window.");
	}
	
	public function zoomIn($sender, $param){
		$this->Map->setZoomLevel(16);
		$this->label->setText("Set zoom level to 16.");
	}
	
	public function reCenter($sender, $param){
		$this->Map->setCenter("(44.33,-89.22)");
		$this->label->setText("Set center to (44.33,-89.22).");
	}
	
	public function changeControls($sender, $param){
		$this->Map->setMapControls("('GSmallMapControl','GMapTypeControl')");
		$this->label->setText("Changed map controls.");
	}
	
	public function changeBounds($sender, $param){
		$this->Map->setBounds(array(44.302721485103355, 44.36166039985622, -89.27610397338867, -89.16624069213867));
		$this->label->setText("Set bounds to (44.303, 44.362, -89.277, -89.166).");
	}
	
	public function mapClick($sender, $param){
		$marker = prado::createComponent('BActiveGoogleMapMarker');
//		$marker->setID('Test10');
		$marker->setPoint($param->point);
		$marker->setDraggable(TRUE);
		$this->Map->addMarker($marker);
		$this->label->setText("Marker added at (".implode(', ',$param->point).").");
	}
	
	public function markerDrag($sender, $param){
		$this->label->setText("Marker moved to (".implode(', ',$param->point).").");
	}
}
?>